package com.ymatou.app.api.trading.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.app.api.trading.parameter.ScartProdBean;
import com.ymatou.app.api.trading.service.ScartProdCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.tag.P1;

/**
 * 添加购物车
 */
public class Ts_ScartProd {
	private static ScartProdBean bean = null;
	private static ScartProdCall call= null;
	
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("添加购物车");
	}
	
	@Before
	public void caseUp() {
		bean = new ScartProdBean();
		call = new ScartProdCall();
	}
	
	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}
	
	@After
	public void caseDown() {
		Logger.end();
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_ScartProd_001() {
		Logger.start(true,"添加购物车成功");
		try {
			bean.setCatalogid("");
			bean.setPurchasenum(1);
			bean.setSource(0);
			
			Logger.comment("ScartProdCall Send:" + call.getEntityString());
			Logger.comment("ScartProdCall response:" + call.getReturnData());
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}
